package com.javaeedev.junit;

public class WritingThread extends Thread {

    private Cache cache;

    public WritingThread(Cache cache) {
        this.cache = cache;
    }

    public void run() {
        for(int i=0; i<1000; i++) {
            char c = (char)((int)(Math.random() * ('Z' - 'A')) + 'A');
            cache.write(c);
        }
    }

}
